package com.mbc.hr.entities;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name="HR_Department")
@NamedQueries({
	@NamedQuery(name="Department.findAll", query="SELECT d FROM Department d"),
	@NamedQuery(name="Department.findAllByParent",query="SELECT d FROM Department d WHERE d.parentID = :parentID"),
	@NamedQuery(name="Department.deleteByParent",query="DELETE FROM Department d WHERE d.parentID = :parentID"),
	@NamedQuery(name="Department.findAllByBranch", query="SELECT d FROM Department d WHERE d.branchId = :branchId")
})
public class Department implements Serializable {

	@Id
	private Long departmentID;
	private Date createdDate;
	private Long branchId;
	private String departmentName;
	private Long parentID;

	public Long getDepartmentID(){
		return departmentID;
	}

	public void setDepartmentID(Long departemtnID){
		this.departmentID = departemtnID;
	}

	public Date getCreatedDate(){
		return createdDate;
	}

	public void setCreatedDate(Date createdDate){
		this.createdDate = createdDate;
	}

	public Long getBranchId(){
		return branchId;
	}

	public void setBranchId(Long branchId){
		this.branchId = branchId;
	}

	public String getDepartmentName(){
		return departmentName;
	}

	public void setDepartmentName(String departmentName){
		this.departmentName = departmentName;
	}

	public Long getParentID(){
		return parentID;
	}

	public void setParentID(Long parentID){
		this.parentID = parentID;
	}


}
